import MusicManager from "../../MusicManager";
import Dialog from "./Dialog";

const { ccclass, property } = cc._decorator;

@ccclass
export default class PauseDialog extends Dialog {

    public init(...args: any[]) {
    }

    onClick(event: cc.Event) {
        MusicManager.instance.play(MusicManager.instance.btnMove);
        let name = event.target.name;
        switch (name) {
            case "继续游戏":
                this.closeDialog();
                break;
            case "返回主页":
            

                cc.director.loadScene("Main");
                break;
        }
    }

    public closeDialog(): void {
        this.node.active = false;
    }

}
